- expanded = integration_expanded?('plantuml_')

= render ::Layouts::SettingsBlockComponent.new(_('PlantUML'),
  id: 'js-plantuml-settings',
  expanded: expanded) do |c|
  - c.with_description do
    = _('Render diagrams in your documents using PlantUML.')
    = link_to _('Learn more.'), help_page_path('administration/integration/plantuml.md'), target: '_blank', rel: 'noopener noreferrer'
  - c.with_body do
    = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form', id: 'plantuml-settings' } do |f|
      = form_errors(@application_setting) if expanded

      %fieldset
        .form-group
          = f.gitlab_ui_checkbox_component :plantuml_enabled,
            _('Enable PlantUML')
        .form-group
          = f.label :plantuml_url, _('PlantUML URL'), class: 'label-bold'
          = f.text_field :plantuml_url, class: 'form-control gl-form-input', placeholder: 'http://your-plantuml-instance:8080'
          .form-text.gl-text-subtle
            = _('The hostname of your PlantUML server.')

      = f.submit _('Save changes'), pajamas_button: true
